import { ResourceInfo } from "info/ResourceInfo";
//class ResourceManager
    
    export  class ResourceManager
    {
       

        public static addResource(arg1: ResourceInfo): void
        {
            ResourceManager._resourceNameMap[arg1.name] = arg1;
            return;
        }

        public static removeResource(arg1: ResourceInfo): void
        {
            delete ResourceManager._resourceNameMap[arg1.name];
            return;
        }

        public static getInfoByName(arg1: string): ResourceInfo
        {
            return ResourceManager._resourceNameMap[arg1] as ResourceInfo;
        }

        public static hasInfoByName(arg1: string): Boolean
        {
            return arg1 in ResourceManager._resourceNameMap;
        }

        public static disposeAll(): void
        {
            var loc1=null;
            var loc2=0;
            var loc3=ResourceManager._resourceNameMap;
            for(loc1 of loc3) 
            {
                loc1.dispose();
            }
            flash.system.System.gc();
            return;
        }

        private static /* var */_resourceNameMap: Map<any, any> /* flash.utils.Dictionary */;

        private static /* var */_instance: ResourceManager;
    }

            ResourceManager._resourceNameMap = new Map<any, any> /* flash.utils.Dictionary */();
        